package com.vmj.classfile.entity.constantinfo;

import com.vmj.classfile.ClassReader;
import com.vmj.classfile.entity.AbstractConstantInfo;

/**
 * Created by yangshoujun on 2017/8/6 下午2:09.
 */
public class ConstantNameAndTypeInfo extends AbstractConstantInfo {

    int nameIndex;
    int descriptorIndex;
    public ConstantNameAndTypeInfo(ClassReader reader) {
        super(reader);
    }

    public void parse() {
        nameIndex = getReader().readTwoByte();
        descriptorIndex = getReader().readTwoByte();
    }

    public int getNameIndex() {
        return nameIndex;
    }

    public int getDescriptorIndex() {
        return descriptorIndex;
    }
}
